Near-eye display devices such as a head mounted display (HMD) are becoming popular now. The working principle of the HMD is to magnify an image on an ultra micro display screen through a group of high-precision optical lens and to project the image onto eyes, so that a user wearing the near-eye device can see a magnified virtual image similar to the one generated by a magnifying lens. In order to adapt the same device for interpupillary distances of different users, the existing HMDs have an interpupillary distance adjustment function. But the existing HMDs cannot adjust a diopter to adapt for a myopic or a hypermetropic user.